﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoolERP_Entities;
using CoolERP_DAL;

namespace CoolERP_BLL
{
    public class XSDDBLL : BaseBLL<XSDD>
    {       
        public XSDDBLL() { }

        public List<vXSDD> GetXSDD(Dictionary<string, string> dc, string orderExpr, int? pageIndex, int pageSize, out int totalCount)
        {
            IXSDDDAL _dal = new XSDDDAL(context);
            return _dal.GetXSDD(dc, orderExpr, pageIndex, pageSize, out  totalCount);
        }

        /// <summary>
        /// 确认订单后转换为合同（-1：产品库中无订单中所需产品，0：确认失败，1：确认成功）
        /// </summary>
        /// <param name="ID">订单ID</param>
        /// <param name="HTBH">合同编号</param>
        /// <returns></returns>
        public int ConfirmOrder(Guid ID, string HTBH)
        {
            IXSDDDAL _dal = new XSDDDAL(context);
            return _dal.ConfirmOrder(ID, HTBH);
        }
    }
}
